package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.DefinitionAuditorMapper;
import com.ruoyi.business.domain.DefinitionAuditor;
import com.ruoyi.business.service.IDefinitionAuditorService;
import com.ruoyi.common.core.text.Convert;

/**
 * 节点审核人Service业务层处理
 * 
 * @author x1ao
 * @date 2021-07-20
 */
@Service
public class DefinitionAuditorServiceImpl implements IDefinitionAuditorService 
{
    @Autowired
    private DefinitionAuditorMapper definitionAuditorMapper;

    /**
     * 查询节点审核人
     * 
     * @param nodeId 节点审核人ID
     * @return 节点审核人
     */
    @Override
    public DefinitionAuditor selectDefinitionAuditorById(Long nodeId)
    {
        return definitionAuditorMapper.selectDefinitionAuditorById(nodeId);
    }

    /**
     * 查询节点审核人列表
     * 
     * @param definitionAuditor 节点审核人
     * @return 节点审核人
     */
    @Override
    public List<DefinitionAuditor> selectDefinitionAuditorList(DefinitionAuditor definitionAuditor)
    {
        return definitionAuditorMapper.selectDefinitionAuditorList(definitionAuditor);
    }

    /**
     * 新增节点审核人
     * 
     * @param definitionAuditor 节点审核人
     * @return 结果
     */
    @Override
    public int insertDefinitionAuditor(DefinitionAuditor definitionAuditor)
    {
        return definitionAuditorMapper.insertDefinitionAuditor(definitionAuditor);
    }

    /**
     * 修改节点审核人
     * 
     * @param definitionAuditor 节点审核人
     * @return 结果
     */
    @Override
    public int updateDefinitionAuditor(DefinitionAuditor definitionAuditor)
    {
        return definitionAuditorMapper.updateDefinitionAuditor(definitionAuditor);
    }

    /**
     * 删除节点审核人对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDefinitionAuditorByIds(String ids)
    {
        return definitionAuditorMapper.deleteDefinitionAuditorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除节点审核人信息
     * 
     * @param nodeId 节点审核人ID
     * @return 结果
     */
    @Override
    public int deleteDefinitionAuditorById(Long nodeId)
    {
        return definitionAuditorMapper.deleteDefinitionAuditorById(nodeId);
    }
}
